package com.bawei.module_motocircle.http

import com.bawei.lib_net.NetModule
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

/**
 * @author yaotianxue
 * @description 提供
 * @date 2025/5/23
 */
@Module
@InstallIn(SingletonComponent::class)
object MotorCircleNetModule {

    @Provides
    @Singleton
    @CommonMainApi
    fun provideMainApi(@NetModule.CommonRetrofit retrofit: Retrofit):MotorCircleApi{
        return retrofit.create(MotorCircleApi::class.java)
    }

    @Provides
    @Singleton
    @SignMainApi
    fun provideSignMainApi(@NetModule.SignRetrofit retrofit: Retrofit):MotorCircleApi{
        return retrofit.create(MotorCircleApi::class.java)
    }

    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class CommonMainApi


    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class SignMainApi



}